package com.hang.gymmanager.convert;

import com.hang.gymmanager.entity.*;
import com.hang.gymmanager.req.AddActivityReq;
import com.hang.gymmanager.req.AddCommodityReq;
import com.hang.gymmanager.req.UserRegisterReq;
import com.hang.gymmanager.res.*;
import org.mapstruct.Mapper;

import java.util.List;

@Mapper(componentModel = "spring")
public interface PojoConvert {

    UserInfoEntity registerReq2Entity(UserRegisterReq req);

    CommodityEntity addCommodityReq2Entity(AddCommodityReq req);

    ActivityEntity addActivityReq2Entity(AddActivityReq req);

    List<UserPlacePageRes> userActivityPageEntity2Res(List<ActivityEntity> entities);

    List<UserCoursePageRes> userCoursePageEntity2Res(List<CourseEntity> records);

    List<UserCommodityPageRes> userCommodityPageEntity2Res(List<CommodityEntity> records);

    List<CenterOrderPageRes> UserCenterOrderEntity2Res(List<OrderEntity> records);

    List<CenterPlacePageRes> centerPlaceEntity2Res(List<PlaceUseRecordEntity> list);
}
